home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / comm / rshdn211.zip / WRSHDNT.TXT < prev    next >
Text File  |  1996-12-04  |  80KB  |  1,887 lines

  1. DENICOMP SYSTEMS                                       Winsock RSHD/NT
  2. ----------------------------------------------------------------------
  3. Copyright 1995  Denicomp Systems
  4. All Rights Reserved
  5.  
  6.  
  7. INTRODUCTION
  8.  
  9. Winsock RSHD/NT (Remote Shell Daemon) is a service for Windows NT
  10. that accepts requests for command execution and file transfers
  11. from other hosts on the network via TCP/IP and executes them on
  12. the PC running Winsock RSHD/NT.  It runs under Microsoft Windows
  13. NT 3.5 or higher.
  14.  
  15. Winsock RSHD/NT is similar to the Unix server of the same name,
  16. but provides some special functionality for the Windows
  17. environment, such as:
  18.  
  19.     - Ability to send keystrokes to the command running under Windows NT
  20.     - Support for the rcp command to allow copying to and from the PC
  21.     - Security mechanism to allow/deny access for hosts and users
  22.     - Capture of standard output/standard error output of NT Console and
  23.       MS-DOS programs
  24.  
  25. Command requests can come from hosts running other operating
  26. systems such as Unix or from other PC's running Windows NT or
  27. Windows 3.1 using the standard rsh utility that comes with your
  28. TCP/IP package or Winsock RSH, also available from Denicomp
  29. Systems.
  30.  
  31. Files can be copied to the PC or from the PC running Winsock
  32. RSHD/NT using the standard TCP/IP rcp command.  This includes the
  33. rcp command available with Unix or Windows NT or a PC-based rcp
  34. command such as Winsock RCP, also available from Denicomp Systems.
  35.  
  36.  
  37. REQUIREMENTS
  38.  
  39. Winsock RSHD/NT requires a Intel x86-based PC running Windows NT
  40. 3.5 or higher and a network.
  41.  
  42. Winsock RSHD/NT does not run under Windows 95.  There is a version
  43. specifically written for Windows 95 called Winsock RSHD/95.
  44. Contact Denicomp Systems for more information.
  45.  
  46. WINSOCK RSHD/NT INSTALLATION
  47.  
  48. To install Winsock RSHD/NT,  insert the Winsock RSHD/NT diskette
  49. into your diskette drive.  Then, from the Windows NT Program
  50. Manager menu, select File, then Run.  Then type the name of your
  51. diskette drive followed by "SETUP".  For example, if the diskette
  52. is in the A: drive, type "A:SETUP".  Then press the Enter key.
  53. (This can also be done from a Command Prompt if you prefer).
  54.  
  55. The Winsock RSHD/NT Installation window will then appear.  Verify
  56. that the drive letter shown in the Source field is correct.  If it
  57. is not, specify the proper drive.
  58.  
  59. Specify the directory in which you would like Winsock RSHD/NT to
  60. be installed in the Destination field.  This will default to the
  61. \WRSHDNT directory on the drive where Windows NT is installed.
  62. You may change it if you wish.
  63.  
  64. If you do not want Winsock RSHD/NT to be installed as a Windows NT
  65. Service, uncheck the Install as Service option and it will not be
  66. added to the list of Windows NT Services.  Winsock RSHD/NT can be
  67. run as a program instead of a service if you wish (explained
  68. later).
  69.  
  70. Press the Install button to begin the installation.  Press Cancel
  71. if you wish to exit.
  72.  
  73. Files will be copied from the diskette onto your hard drive.  When
  74. all files have been copied, the installation will ask you whether
  75. or not you want Windows NT to start the Winsock RSHD/NT service
  76. each time Windows NT starts.  Click Yes to start it automatically
  77. each time Windows NT starts or No if you want to start it
  78. manually.
  79.  
  80. The Winsock RSHD/NT service will then be installed in Windows NT's
  81. list of services and it will be started.
  82.  
  83. See the section on Winsock RSHD/NT Utilities for instructions on
  84. how to manually start and stop the Winsock RSHD/NT service.
  85.  
  86.  
  87. REMOVING WINSOCK RSHD/NT
  88.  
  89. To remove Winsock RSHD/NT, you must first stop the Winsock RSHD/NT
  90. service, then remove the service from Windows NT's list of
  91. services.  From the Windows NT Program Manager menu, choose File,
  92. then Run.  Enter the directory in which you installed Winsock
  93. RSHD/NT followed by "wrshdctl".  For example,
  94. "c:\wrshdnt\wrshdctl".  Press Enter.
  95.  
  96. From the Winsock RSHD/NT Control menu, first select "Stop the
  97. Winsock RSHD/NT Service".  Then select "Remove the Winsock RSHD/NT
  98. Service".
  99.  
  100. Note: You may also use the Windows NT Control Panel "Services"
  101. icon to do this.
  102.  
  103. You can then delete the Winsock RSHD/NT directory.  You should
  104. also delete the files WRSHDNT.CPL  and WRSHDNT.HLP in the Windows System
  105. directory (\WINNT35\SYSTEM32 for example).  This is the Control Panel
  106. applet for Winsock RSHD/NT and its help file.
  107.  
  108.  
  109. RUNNING WINSOCK RSHD/NT AS A PROGRAM
  110.  
  111. You can optionally run Winsock RSHD/NT as a Windows NT program
  112. instead of a service.  This requires that somone log in to Windows
  113. NT so that Winsock RSHD/NT starts.
  114.  
  115. To start Winsock RSHD/NT as a program, execute the following
  116. command:
  117.  
  118.           wrshdnt  /s
  119.  
  120. If you are executing this command from the Windows NT Command
  121. Prompt, you should use the command:
  122.  
  123.           start wrshdnt  /s
  124.  
  125. If you do not use the start command, you will not have access to
  126. that Command Prompt window until Winsock RSHD/NT is stopped.  Be
  127. sure that you do not already have Winsock RSHD/NT running as a
  128. service.
  129.  
  130. When Winsock RSHD/NT is started, it will display a window where
  131. messages about the status of Winsock RSHD/NT will display.  The
  132. number and type of messages that display depends on the Message
  133. Level option in the Winsock RSHD/NT Configuration.
  134.  
  135. To stop Winsock RSHD/NT, simply close the window.
  136.  
  137. Important Note:  The ability to send keystrokes via the rsh
  138. command through Winsock RSHD/NT does not work when it is running
  139. as a program.
  140.  
  141.  
  142. WINSOCK RSHD/NT CONFIGURATION
  143.  
  144. Winsock RSHD/NT will work properly using its default
  145. configuration.  You only need to configure Winsock RSHD/NT if you
  146. wish to change any of the available options, enable security, or
  147. use the logging capabilities.  By default, no security is enforced
  148. and no logging is done
  149.  
  150. You configure Winsock RSHD/NT by using the Windows NT Control
  151. Panel.  In the Control Panel, you should see an icon labeled RSHD.
  152. Double-clock on that icon to configure Winsock RSHD/NT.
  153.  
  154. Important Note:  After changing a Winsock RSHD/NT Configuration
  155. option, you do not need to stop and restart Winsock RSHD/NT.  It
  156. will recognize the change, unless you disable the monitoring of
  157. the registry (see below).
  158.  
  159.  
  160. SECURITY AND LOGS
  161.  
  162.  
  163. Security File:                (Default: None)
  164.  
  165.      Specify the full path name of the Security File used by
  166.      Winsock RSHD/NT to enforce security (allow and deny users and
  167.      hosts).  The format of this file is explained in more detail
  168.      later.  If you do not specify a Security File, all users and
  169.      hosts will be granted access to execute commands and transfer
  170.      files to and from your PC, unless you enable the option that
  171.      requires remote user names to exist as Windows NT users (see
  172.      below).
  173.      
  174.      If you do specify a Security File and it does not exist, no
  175.      users or hosts will be granted access.
  176.  
  177.      If you do not wish to enforce any security, do not specify a
  178.      filename.
  179.      
  180. Must Remote Users be Valid Users on this System?  (Default: Unchecked)
  181.  
  182.      If this option is unchecked, user login names sent to Winsock
  183.      RSHD/NT by rcp and rsh do not need to be valid users on this
  184.      system.  Security is enforced soley through the Security
  185.      File.
  186.      
  187.      If this option is checked, user login names from rcp and rsh
  188.      must be valid users on the this system.  If the user is not
  189.      valid, access will be denied.  This is the standard behavior
  190.      of a rshd daemon.  However, if the rcp and rsh commands are
  191.      being executed from another operating system such as Unix,
  192.      the user login names may not be the same between systems.  If
  193.      user logins are the same, you can then enable this option for
  194.      security.  If they are different, you should not enable this option.
  195.  
  196. Message Log:                  (Default: None)
  197.  
  198.      Specify the full path name of a file where any messages from
  199.      Winsock RSHD/NT should be stored.  The message file is
  200.      optional.  You should only enable the message log when you
  201.      are trying to find the source of a problem, since the message
  202.      log can become quite large on an active system.
  203.      
  204.      This option is used in conjunction with the Message Level
  205.      option.  If Message Level is set to a value greater than zero
  206.      (0), Winsock RSHD/NT will output messages that provide
  207.      information about its operation.  These messages are mostly
  208.      useful for problem determination.
  209.      
  210.      The message file created is a text file that you can examine
  211.      at any time using utilities such as TYPE or MORE, or editors
  212.      such as Notepad.  You can clear the message log at any time
  213.      by simply deleting it.
  214.      
  215. Message Level:                (Default: 0)
  216.  
  217.      Specifies the level of detail of the messages stored in the
  218.      file specified in the Message Log option.  The default level
  219.      is 0, which will not write any messages to the message log
  220.      file.  Levels 1 through 4 will product increasing amounts of
  221.      detail (level 1 provides the least detail, level 4 provides
  222.      the most).
  223.  
  224. Request Log:                  (Default: None)
  225.  
  226.      This option allows you to log all requests (commands to be
  227.      executed) in a file you specify.  Each time someone attempts
  228.      to execute a command through Winsock RSHD/NT, the date and
  229.      time, the user name, the host name, and the command will be
  230.      written to this file.
  231.  
  232. Deny Log:                     (Default: None)
  233.  
  234.      This option allows you to log all permission violations in a
  235.      file you specify.  Each time someone is denied permission to
  236.      execute a command through Winsock RSHD/NT, the date and time,
  237.      the user name, the host name, and the command will be written
  238.      to this file.
  239.      
  240. Error Log:                    (Default: None)
  241.  
  242.      This option allows you to log all command execution errors in
  243.      a file you specify.  Each time someone receives an error
  244.      trying to execute a command through Winsock
  245.      
  246.      RSHD/NT, the date and time, the user name, the host name, the
  247.      command, and error message will be written to this file.
  248.      These are errors that occur after the user has been
  249.      granted permission to execute the command.  For example, an
  250.      error would be logged if a program was to be run that did not
  251.      exist.
  252.      
  253.  
  254. NOTE: Each of the log files may refer to the same file name if you
  255. wish. They will not overwrite each other.  Each message is
  256. appended to the end of the file.  You should be sure to
  257. periodically delete the log file(s) because they can get large
  258. over time on an active system.
  259.  
  260.  
  261. RSH OPTIONS
  262.  
  263. Reject All Incoming RSH Commands?       (Default: Unchecked)
  264.  
  265.      If you check this option, all incoming rsh commands will be rejected,
  266.      effectively disabling the rsh serving capability of RSHD/NT.  This is
  267.      useful if you only want to use RSHD/NT as an rcp server.
  268.  
  269.      If a remote user attempts to issue an rsh command to this system, an
  270.      error will be returned to the remote user stating that rsh has been
  271.      disabled.
  272.  
  273.  
  274. Attempt Redirection on Every Command:   (Default: Unchecked)
  275.  
  276.      When you execute a command through Winsock RSHD/NT, it
  277.      assumes that the command is a Windows program (not a Console
  278.      or MS-DOS program) and that there is no redirection of
  279.      standard output/standard error back to the remote system,
  280.      unless you use the special "<[CON]>", "<[CON2]>", "<[DOS]>",
  281.      or "<[DOS2]>" indicators in the rsh command.  (This is
  282.      explained in more detail later.)
  283.      
  284.      If you mostly execute Windows NT Console programs and/or MS-
  285.      DOS programs via rsh through Winsock RSHD/NT, you can check
  286.      this option and Winsock RSHD/NT will assume that each command
  287.      is a Console/MS-DOS program and attempt to send its standard
  288.      output/standard error back to the remote system.  It treats
  289.      every rsh request as if the "<[CON]>" option was specified.
  290.      You do not need to specify the "<[CON]>" indicator; it is assumed.
  291.      
  292.      If you check this option, you still may execute Windows
  293.      programs via rsh and they will operate properly.  However,
  294.      unless you specify the special "<[WIN]>" indicator for
  295.      Windows programs in the rsh command, there are a few
  296.      downsides:  First, there will be slightly more overhead when
  297.      executing Windows programs because Winsock RSHD/NT will
  298.      attempt to capture the standard output/standard error. Also,
  299.      Winsock RSHD/NT will wait for the Windows program to complete
  300.      before closing the connection.  Again, these downsides can be
  301.      overcome by specifying the "<[WIN]>" indicator.
  302.      
  303.  
  304. Execute All Commands through Command Shell?    (Default: Unchecked)
  305.  
  306.      If you check this option, Winsock RSHD/NT will automatically prefix
  307.      every command you execute with the default command shell
  308.      (usually cmd /c).
  309.  
  310.      This is useful if you commonly execute batch files (.BAT or .CMD) or
  311.      other command scripts for the shell you are using and you do not want
  312.      to have to specify the shell command in every rsh command.
  313.  
  314.      The default shell command is used as the prefix.  This command can be
  315.      specified in the Default Shell Command field; if no default shell
  316.      command is specified there, cmd /c is used.
  317.  
  318.      For example, if this option is enabled and you execute the following
  319.      command from a remote system:
  320.  
  321.         rsh ntsystem xyz.bat
  322.  
  323.      RSHD/NT will execute the command as:
  324.  
  325.         cmd /c xyz.bat
  326.  
  327.  
  328. List of Commands to Allow (File):     (Default: Blank)
  329.  
  330.      This option allows you to specify the name of a file that contains a
  331.      list of commands that users are permitted to execute on this system
  332.      through rsh.  This allows you to provide strict control over the
  333.      commands users can execute.
  334.  
  335.      If no filename is specified here, all commands are permitted.
  336.  
  337.      The file must be a plain text file, with each permitted command on a
  338.      line by itself.  Commands in the file should not contain any spaces.
  339.      Comparison of commands is done only up to the first space or tab
  340.      character.  When a user executes a command on this system through
  341.      rsh, RSHD/NT will extract the first part of the command, up to the
  342.      first space or tab character, and compare that to the lines in the
  343.      file specified.  If it does not exist in the file, the rsh command
  344.      will be rejected.
  345.  
  346.  
  347. Environment Variable File:             (Default: Blank)
  348.  
  349.      This allows you to specify the name or names of files that contain
  350.      environment variables that should be made available when commands
  351.      are executed by RSHD/NT through rsh.
  352.  
  353.      Normally, the environment for commands executed through RSHD/NT comes
  354.      from the System Environment Variables specified in the System applet
  355.      in the Control Panel.  Those variables are inherited from the Windows
  356.      NT Service Manager, so if the System Environment Variables are changed,
  357.      you must reboot the system for them to be propagated to RSHD/NT
  358.      (if you are running RSHD/NT as a service).
  359.  
  360.      Alternatively, you can create a custom environment for RSHD/NT by
  361.      entering the environment variables and values in a plain text file.
  362.      Each line in the text file should have the format:
  363.  
  364.      VARIABLE=VALUE
  365.  
  366.      Each time a command is executed through RSHD/NT by rsh, a custom
  367.      environment is built from the file or files specified in this parameter,
  368.      based on the lines in those files.
  369.  
  370.      You can specify a single filename or multiple filenames, with each
  371.      separated by semi-colons (;).  Each file is read in sequence and
  372.      added to the System Environment Variables inherited by RSHD/NT to 
  373.      create a new environment for the command to be executed.  If a 
  374.      variable name appears in multiple files, the last value read will
  375.      be used.
  376.  
  377.      You may reference previously set environment variables as you do in
  378.      Windows NT batch files using %VAR%.  For example:
  379.  
  380.      PATH=%PATH%;C:\MYPROGS
  381.  
  382.      The filenames should be full path names.  There are three special
  383.      keywords that you can use in the filenames if you wish:
  384.  
  385.     %ruser% - Substitute the login name of the remote user
  386.     %luser% - Substitute the login name of the local user
  387.     %rhost% - Substitute the host name of the remote host
  388.  
  389.      The %ruser% substitutes the login name of the remote user.  This will
  390.      be the login name the user used to log into the remote host from which
  391.      the rsh command is being issued, unless the -l option of the rsh
  392.      command was used to specify a different user; then that user will be
  393.      substituted.
  394.  
  395.      The %luser% substitutes the login name of the local user on the remote
  396.      host.  Normally, it is the same as %ruser%, unless the -l option of the
  397.      rsh command was used.  Then, this will contain the actual user login
  398.      used at the remote host.
  399.  
  400.      For example, if you are logged in as "john" on a remote host and you
  401.      issue the command "rsh -l mary winpc xyz", the %ruser% will
  402.      substitute "mary" and the %luser% will substitute "john".
  403.  
  404.      The %rhost% substitutes the host name of the remote host, if it is
  405.      available.  That is, RSHD/NT must be able to find the name of the
  406.      remote host based on its IP address, either by using the HOSTS file
  407.      or DNS.  If it is not found, the IP address will be substituted.
  408.  
  409.      These special keywords allow you to have different environment files
  410.      for different users if necessary.  For example, if you specify the
  411.      environment variable file:
  412.  
  413.      c:\env\%ruser%.env
  414.  
  415.      When "john" issues an rsh command, RSHD/NT will get the environment
  416.      from the file "c:\env\john.env".  When "mary" issues an rsh command,
  417.      RSHD/NT will get the environment from the file "c:\env\mary.env".
  418.  
  419.      Also, using the capability to specify multiple files, you can have a
  420.      single "master" environment, and then only modifications to it by user.
  421.      For example, you can have a standard set of environment variables in
  422.      the file "c:\env\master.env" and user-specific modifications in the
  423.      file "c:\env\%ruser%.env".  Your environment variable file field 
  424.      would read:
  425.  
  426.      c:\env\master.env;c:\env\%ruser%.env
  427.  
  428.      First the variables in master.env would be read, then those for the
  429.      user in %ruser%.env.
  430.  
  431.  
  432.      THE SPECIAL "new" KEYWORD
  433.  
  434.      The format of the environment variable files must be:
  435.  
  436.      VARIABLE=VALUE
  437.  
  438.      But, with one exception.  If you specify the word "new" on a line
  439.      by itself in an environment variable file, it will purge all
  440.      environment variables set up to that point.
  441.  
  442.      The primary purpose of this would be to remove all variables
  443.      inherited from the System Environment Variables.  It allows you to
  444.      start with a "clean slate" and set all environment variables 
  445.      from scratch.
  446.  
  447.  
  448. Default Command Shell:          (Default: Blank - Use "CMD /C")
  449.  
  450.      This option allows you to specify the default command shell to be
  451.      used when RSHD/NT detects an internal command or the command shell to
  452.      be used if the option to Execute All Commands through Command Shell
  453.      is checked.
  454.  
  455.      You should use this option only if you are using an alternate command
  456.      shell.  By default, RSHD/NT uses the Windows NT command shell CMD.EXE.
  457.  
  458.      You must specify all necessary options to the command shell so that
  459.      it can be prefixed to any command (internal or external).
  460.  
  461.      If you end the command with a single-quote (') or double-quote ("),
  462.      RSHD/NT will supply the closing quote, enclosing the command
  463.      received from rsh in quotes.  This is necessary for some shells
  464.      that will interpret command line options as their own, such as
  465.      the Bourne shell.  If you were using the Bourne shell (or Korn
  466.      shell, you would enter the following:
  467.  
  468.             sh -c "
  469.  
  470.      In this case, for example, the command:
  471.  
  472.             rsh ntsystem ls -l
  473.  
  474.      Would execute the following through RSHD/NT:
  475.  
  476.             sh -c "ls -l"
  477.  
  478.      If the trailing quote was not present, it would execute:
  479.  
  480.             sh -c ls -l
  481.  
  482.      And "sh" would interpret the "-l" as an option to itself instead
  483.      of as an option to "ls".
  484.  
  485.  
  486. Internal Command List:          (Default: Blank)
  487.  
  488.      If you specified a Default Command Shell that has different internal
  489.      commands than those of the standard Windows NT command shell CMD.EXE,
  490.      you can specify the internal commands for that shell here.  Separate
  491.      each command with a comma (,).  Do not include any spaces.
  492.  
  493.      If you checked the option to Disable Detection of Internal Commands,
  494.      this is not necessary and will have no effect.
  495.  
  496.      You only need to specify this list if you want RSHD/NT to recognize
  497.      commands internal to your command shell and automatically prefix the
  498.      command with the appropriate shell command.
  499.  
  500.  
  501. Buffer Stdout/Stderr Until End of Command?     (Default: Unchecked)
  502.  
  503.      Check this option if you want RSHD/NT to buffer (store in a file)
  504.      the standard output and standard error output of the commands you
  505.      execute, and then send all of the output when the command completes.
  506.  
  507.      Prior to Version 2.0, this was the standard behavior of RSHD/NT.
  508.      With Version 2.0, the standard output and standard error is sent as
  509.      it occurs (although it may be buffered by Windows NT or the program
  510.      executed).  If you check this option, RSHD/NT will operate as it did
  511.      in previous versions.
  512.  
  513.  
  514. Disable Detection of Internal Commands?:    (Default: Unchecked)
  515.  
  516.      When you execute a command via RSH through RSHD/NT, it will
  517.      examine the command and determine whether or not it is a
  518.      Windows NT "internal command".  That is, the command does not
  519.      actually exist as an executable file, but is interpreted by
  520.      the Windows NT Command Interpreter (CMD.EXE).  Some examples
  521.      of internal commands are DIR, TYPE, and SET.
  522.  
  523.      If RSHD/NT determines that it is an internal command, it will
  524.      prefix the command with "CMD /C" so that it executes properly.
  525.  
  526.      However, if you are using an alternate command interpeter, you
  527.      may not want this to occur, so you can disable the examination
  528.      of the commands by checking this option.
  529.  
  530.  
  531. Default Window Type for Commands Executed with RSH:  (Default: Normal)
  532.  
  533.      Specifies the default window type to be used when executing
  534.      commands through Winsock RSHD/NT using the rsh command.  The
  535.      default window type is used when the special window type
  536.      indicators (<[NORMAL]>, <[MINIMIZE]>, <[MAXIMIZE]>, <[HIDE]>,
  537.      etc.) are not specified in the rsh command.
  538.      
  539.      The options available are:
  540.      
  541.      Normal:     The window for the command will display at its normal size.
  542.      
  543.      Minimized:  The window for the command will be minimized (without focus).
  544.      
  545.      Maximized:  The window for the command will be maximized.
  546.      
  547.      Hidden:     The window for the command will be hidden.
  548.      
  549.      There are a few points you must consider when selecting the
  550.      default window type:
  551.      
  552.           - The Minimized or Hidden options are useful when the system
  553.             running RSHD/NT is actively used and is not a standalone server.
  554.             With the Normal or Maximized options, the person using the system
  555.             will see a window appear each time a command is executed through
  556.             rsh.
  557.           - You cannot send keystrokes to commands that are minimized or
  558.             hidden.  So if you select the Minimized or Hidden option, you must
  559.             override it in the rsh command when you want to send keystrokes.
  560.             That is, you will need to add the <[NORMAL]> option to the
  561.             command.
  562.           - Using the Hidden option can cause administrative problems.
  563.             When a program's window is hidden, it does not appear in the Task
  564.             List, so there is not an easy way to stop a hidden program or to
  565.             tell if any are running.  There are utilities that allow you to
  566.             see the hidden programs (such as the PView program that comes with
  567.             Microsoft Visual C/C++).
  568.  
  569.  
  570. RCP OPTIONS
  571.  
  572. Reject All RCP Copies to This System:      (Default: Not Checked)
  573.  
  574.      If this option is checked, all attempts to copy files to this system
  575.      with the rcp command will be rejected with an error message stating
  576.      that incoming copies are disabled.  This allows you to make the system
  577.      "read only" when using the rcp command.
  578.  
  579.      You can also reject copying from the system, essentially disabling the
  580.      rcp capability of RSHD/NT.
  581.  
  582.  
  583. Reject All RCP Copies to From System:      (Default: Not Checked)
  584.  
  585.      If this option is checked, all attempts to copy files from this
  586.      system with the rcp command will be rejected with an error message
  587.      stating that outgoing copies are disabled.  This allows you to make
  588.      the system "write only" when using the rcp command.
  589.  
  590.      You can also reject copying to the system, essentially disabling the
  591.      rcp capability of RSHD/NT.
  592.  
  593.  
  594. Preserve Case in Multi-File Copies:     (Default: Unchecked)
  595.  
  596.      Specifies whether Winsock RSHD/NT should preserve the case of
  597.      filenames when files are copied from this system by rcp using
  598.      wildcards or recursive copies.  By default, when the remote
  599.      system uses a wildcard or recursive copy to get files from
  600.      this PC, Winsock RSHD/NT will convert all directory and
  601.      filenames to lowercase letters before sending them to the
  602.      remote system.
  603.      
  604.      Although the Windows NT filesystem is not case sensitive (ABC
  605.      and abc are the same file), it can store the case of the
  606.      filename.  When copying files via rcp to operating systems
  607.      that are case sensitive, such as Unix, it is usually most
  608.      useful to convert all of the names to lowercase letters.
  609.      
  610.      If you do not wish to have all of the names converted to
  611.      lowercase letters, check this option.  The rcp command will
  612.      then create files in exactly the same case as the names
  613.      appear in the directory under Windows NT.
  614.      
  615.      Note that this affects only wildcard and recursive copies.
  616.      When copying individual files, the files will be created in
  617.      the case you specify in the rcp command.
  618.  
  619.  
  620. Automatic End-of-Line Conversion:        (Default: Not Checked - Never)
  621.  
  622.      Specifies whether or not RSHD/NT should perform any end-of-line
  623.      conversions on files transferred to or from the NT system using rcp.
  624.  
  625.      Under MS-DOS, Windows 3.x, Windows 95, and Windows NT, lines of text
  626.      are delimited by carriage return and newline pairs (ASCII 13 and
  627.      ASCII 10).  Under Unix, lines of text are delimited by only newlines
  628.      (ASCII 10).  Often, when copying text files between the two operating
  629.      systems, it is necessary to convert the end-of-line delimiters to the
  630.      proper method.  RSHD/NT provides a way to automatically do this.
  631.  
  632.      When files are copied from the NT system through RSHD/NT, carriage
  633.      returns will be removed from all carriage return/newline pairs
  634.      (i.e. converted to Unix format).  When files are copied to the NT
  635.      system through RSHD/NT, carriage returns will be added to every 
  636.      newline character that is not already prefixed by a carriage return
  637.      (i.e. converted to NT format).
  638.  
  639.      There are four options available.  The option you select affects all
  640.      rcp copies to this system and all rcp copies from the system.  It does
  641.      not affect the operation of the rcp command itself on the NT system.
  642.      It only affects the result of rcp commands that access files 
  643.      on this system from other systems.
  644.  
  645.      - Never - Copy all files as binary
  646.  
  647.        No end-of-line conversion will be done.  All files will be transferred
  648.        or received unmodified.
  649.  
  650.      - Always - Convert all files
  651.  
  652.        Convert the end-of-line characters on every file copied from or to
  653.        this system through RSHD/NT.
  654.  
  655.      - Convert based on list of file extentions
  656.  
  657.        Only convert end-of-line characters in files ending with the
  658.        specified list of file extensions.  You must then enter the list of
  659.        file extensions.  Separate each file extension by a comma.  Do not
  660.        include any spaces.  You must include the "dot" (.).  For example:
  661.  
  662.               .TXT,.C,.H,.PRN,.MAK
  663.  
  664.        Any file not ending in one of these extensions will be copied without
  665.        modification.
  666.  
  667.      - Convert based on contents of first block
  668.  
  669.        RSHD/NT will examine the contents of the first block of the file to
  670.        be sent or received and determine whether or not an end-of-line
  671.        conversion is necessary.  If the first block contains only text
  672.        characters (letters, numbers, spaces, tabs, carriage returns, newlines,
  673.        backspaces, escapes, and form feeds), RSHD/NT will perform 
  674.        an end-of-line conversion on the file.  If the first block contains
  675.        any other non-text data, it will be copied without modification.
  676.  
  677.        The size of the first block is specified in the RCP Block Size field.
  678.  
  679.  
  680. RCP Home Directory:            (Default: Blank)
  681.  
  682.        Specifies the starting directory where files will be copied from or
  683.        to when a relative path name is used in an rcp command (no initial
  684.        slash or backslash).
  685.  
  686.        This directory must exist if specified.  The directory name specified 
  687.        can contain the following special keywords:
  688.  
  689.     %ruser% - Substitute the login name of the remote user
  690.     %luser% - Substitute the login name of the local user
  691.     %rhost% - Substitute the host name of the remote host
  692.  
  693.        The %ruser% substitutes the login name of the remote user.  This will
  694.        be the login name the user used to log into the remote host from which
  695.        the rcp command is being issued, unless the @ option of the rcp command
  696.        was used to specify a different user; then that user will be
  697.        substituted (e.g. user@host:filename).
  698.  
  699.        The %luser% substitutes the login name of the local user on the remote
  700.        host.  Normally, it is the same as %ruser%, unless the @ option of the
  701.        rcp command was used.  Then, this will contain the actual user login
  702.        used at the remote host.
  703.  
  704.        For example, if you are logged in as "john" on a remote host and you
  705.        issue the command "rcp xyz mary@winpc:", the %ruser% will substitute
  706.        "mary" and the %luser% will substitute "john".
  707.  
  708.        The %rhost% substitutes the host name of the remote host, if it is
  709.        available.  That is, RSHD/NT must be able to find the name of theo
  710.        remote host based on its IP address, either by using the HOSTS file
  711.        or DNS.  If it is not found, the IP address will be substituted.
  712.  
  713.  
  714. RCP Block Size:                    (Default: 512)
  715.  
  716.      Specifies the number of bytes in a block of data that the
  717.      Remote Copy (rcp) service of Winsock RSHD/NT processes at one
  718.      time.  When files are copied to the PC, it reads from the
  719.      network and writes to the disk in blocks of this size.  When
  720.      files are copied from the PC, it reads from the disk and
  721.      writes to the network in blocks of this size.  Note that this
  722.      is an internal block size only; it does not change any TCP/IP
  723.      parameters.
  724.      
  725. RCP Spoofing Prefix:               (Default: <blank>)
  726.  
  727.      Specifies the first characters of the rcp command send by the
  728.      remote host that Winsock RSHD/NT should use when "spoofing"
  729.      the RCP protocol.  With its roots in Unix, the rcp command
  730.      actually internally executes an rsh command to start rcp on
  731.      the remote host before transferring files.  Winsock RSHD/NT
  732.      "spoofs" or looks for rcp commands executed through rsh by
  733.      the remote host and services the RCP transfer.
  734.      
  735.      By default, Winsock RSHD/NT looks for the command prefixes of:
  736.  
  737.      rcp -
  738.      /usr/bin/rcp -
  739.      /usr/lib/sunw,rcp -
  740.      set vms_rcp = 1 ; rcp -
  741.  
  742.      Some rcp commands (especially those on non-Unix and non-Windows
  743.      systems) may send other commands to initiate the RCP protocol.
  744.      If yours does, you should enter the command prefix (up to and
  745.      including the first hyphen) here.
  746.      
  747.      Regardless of the spoofing prefix entered, Winsock RSHD/NT
  748.      will continue to look for the above prefixes.
  749.      
  750.  
  751. Execute All RCP Copies as User:    (Default: <blank>)
  752.      Password:
  753.  
  754.      Normally, all files read or written to by RSHD/NT via the RCP
  755.      command are done so in the context of the user specified in the
  756.      RSHD/NT service setup (by default, this is the user System).
  757.  
  758.      You can change the service setup to execute RSHD/NT as any user.
  759.      However, when you run RSHD/NT as a user other than System, you lose
  760.      access to the NT workstation desktop.  This means that the special
  761.      "send keys" option of the RSH command will no longer work.
  762.  
  763.      To enforce security on RCP commands, but retain the ability to send
  764.      keys to programs through RSH, you can specify a valid user and password
  765.      in these fields.  If you do, RSHD/NT will log in as that user and
  766.      read and write all files as that user when servicing the RCP command.
  767.      All security restrictions on that user will be enforced when files are
  768.      read as a result of an RCP command.  All files created by an RCP
  769.      command will be owned by that user.
  770.  
  771.      If you need to specify a domain name along with the user, specify
  772.      it in the format "domain\user".  Otherwise, the domain of the current
  773.      system will be used.
  774.  
  775.      If you specify an invalid password, all RCP copies will fail.  Also,
  776.      if the specified user's password expires or is changed, you will need
  777.      to manually update the password here.  NT does not do it automatically.
  778.      It is best to specify that the user's password does not expire to
  779.      avoid this.
  780.  
  781.  
  782. ADVANCED OPTIONS
  783.  
  784. Installation Directory:
  785.  
  786.      This is the directory where RSHD/NT is installed.  If you move the
  787.      RSHD/NT directory, you can update this field.
  788.  
  789. Initial Working Directory:             (Default: Instalation Directory)
  790.  
  791.      This specifies the directory that will initially be considered the
  792.      current working directory for all commands executed using rsh.  It will
  793.      also be considered the current working directory for all files copied
  794.      using rcp, unless an RCP Home Directory is specified.
  795.  
  796.      When RSHD/NT starts, it changes to this directory and remains there,
  797.      unless an rsh request is received to execute the cd or chdir command,
  798.      which will change RSHD/NT's working directory.
  799.  
  800.      Note that a cd or chdir command will change RSHD/NT's working directory
  801.      for all subsequent commands, regardless of the user or system they are
  802.      executed from.
  803.  
  804. Disable Multithreading in RSHD:      (Default: Unchecked)
  805.  
  806.      Multithreading allows Winsock RSHD/NT to process multiple
  807.      requests simultaneously.  When multithreading is disabled by
  808.      checking this option, Winsock RSHD/NT will accept and
  809.      complete only one request at a time.  Other requests received
  810.      during this time will be queued and executed in the order in
  811.      which they were received.   Normally, you will want
  812.      multithreading enabled, but you can disable it, for example,
  813.      to ensure that the system will not become bogged down with
  814.      requests.
  815.      
  816. Disable Monitoring of Registry for Changes:  (Default: Unchecked)
  817.  
  818.      Normally, Winsock RSHD/NT starts a thread that monitors the
  819.      Windows Registry for changes to the Winsock RSHD/NT
  820.      configuration options and if any options are changed, re-
  821.      reads the registry so that the new options take effect.
  822.      
  823.      If this option is check to disable the monitoring of the
  824.      Registry, you must stop and start Winsock RSHD/NT manually
  825.      (or by rebooting the system) for the Registry changes to take
  826.      effect.
  827.      
  828.      You may want the Registry monitoring disabled for security
  829.      purposes so that no Winsock RHSD/NT options are changed while
  830.      the system is in operation.
  831.  
  832. Host IP Address (If Multi-Homed):       (Default: None)
  833.  
  834.      If your system is multi-homed (it has multiple network cards,
  835.      each with its own IP address), you can specify which IP
  836.      address RSHD/NT will use to listen for requests.  If you
  837.      leave this empty, it will accept requests from any of the IP
  838.      addresses associated with the system.  If you specify one of
  839.      the addresses of one of the cards (in dotted-decimal format),
  840.      it will only accept requests routed to that address.
  841.  
  842. Listen Port:                       (Default: 514)
  843.  
  844.      Specifies the port number that Winsock RSHD/NT listens to for
  845.      connections.  The standard port for the Remote Shell daemon
  846.      is 514.
  847.  
  848. Listen Backlog:                    (Default: 100)
  849.  
  850.      The number of requests that can be backlogged when Winsock
  851.      RSHD/NT is listening for connections.  The minimum is 1; the
  852.      maximum for Windows NT is 100.
  853.  
  854.  
  855.  
  856. WINSOCK RSHD/NT SECURITY FILE
  857.  
  858. With Unix, security is enforced on remote command execution using
  859. a combination of the password file (/etc/passwd), the hosts file
  860. (/etc/hosts),and the host equivalency files (/etc/hosts.equiv and
  861. $HOME/.rhosts).
  862.  
  863. Winsock RSHD/NT enforces security through the Security File.  The
  864. name of this file is specified in the Winsock RSHD/NT
  865. Configuration in the Security File entry.
  866.  
  867. If you specify a Security File name and the file does not exist or
  868. the file is completely empty, all hosts and users are denied
  869. access.
  870.  
  871. Conversely, if you do not specify a Security File, all hosts and
  872. users are granted access.  So if you do not wish to enforce any
  873. security, do not specify a Security File name in the configuration
  874. file.
  875.  
  876. Additionally, you can configure Winsock RSHD/NT to ensure that
  877. user names on remote hosts are valid on this system.  You should
  878. only enable this security option if you use consistent user names
  879. across all of the systems on your network.
  880.  
  881. You create the Security File using a text editor.  If you are
  882. using the Winsock RSHD/NT Control Panel applet, you can click on
  883. the Edit Security button to run the Windows Notepad editor to edit
  884. the security file specified in the Security File configuration
  885. option.
  886.  
  887. The Security File consists of lines that specify who may or may
  888. not access the PC using Winsock RSHD/NT.  The following are the
  889. options available in:
  890.  
  891.    #
  892.       Any line beginning with # is treated as a comment and is
  893.      ignored.
  894.  
  895.    +
  896.      A plus sign (+) on a line by itself specifies that ALL hosts
  897.      and users are granted permission.  This is useful if you wish
  898.      to allow many hosts and users, but deny only a few.  Use the
  899.      deny options on subsequent lines.
  900.  
  901.    host
  902.  
  903.      You can specify a host that is granted permission by entering
  904.      the name of the host on a line by itself.  All users on that
  905.      host are granted permission, unless you specifically deny
  906.      those users on subsequent lines.
  907.      
  908.      You may also use the IP address of the host instead (the
  909.      dotted-decimal representation).  If you specify the name of
  910.      the host, that name must appear in the hosts file used by
  911.      your TCP/IP package.
  912.  
  913.    !host
  914.  
  915.      You can specify a host that is denied permission by entering
  916.      an exclamation point (!) followed by the name of the host
  917.      name of the host on a line.  All users on that host are
  918.      denied permission, regardless of subsequent lines.
  919.  
  920.      You may also use the IP address of the host instead (the
  921.      dotted-decimal representation).  If you specify the name of
  922.      the host, that name must appear in the hosts file used by
  923.      your TCP/IP package.
  924.  
  925.    +user
  926.      
  927.      You can specify a user name that is granted permission by
  928.      entering a plus sign (+) followed by the user name on a line.
  929.      Do not put any spaces between the plus sign and the user
  930.      name.  That user will be granted permission regardless of the
  931.      host (as long as the host is not specifically denied).
  932.  
  933.      See below for an explanation of the source of the user name
  934.      and how it is validated.
  935.  
  936.    -user
  937.  
  938.      You can specify a user name that is to be denied permission
  939.      by entering a minus sign (-) followed by the user name on a
  940.      line.  Do not put any spaces between the plus sign and the
  941.      user name. That user will be denied permission on all hosts.
  942.  
  943.       See below for an explanation of the source of the user name
  944.      and how it is validated.
  945.  
  946.   +user@host
  947.  
  948.      You can specify a user name and a host that is granted
  949.      permission by entering a plus sign (+) followed by the user
  950.      name, an at-sign (@), followed by the host name on a line.
  951.      Do not put any spaces between the plus sign and the user name
  952.      or before or after the at-sign.  That user on the specified
  953.      host will be granted permission, but only from that host.
  954.  
  955.      You may also use the IP address of the host instead (the
  956.      dotted-decimal representation).  If you specify the name of
  957.      the host, that name must appear in the hosts file used by
  958.      your TCP/IP package.
  959.  
  960.   -user@host
  961.  
  962.      You can specify a user name and a host that is denied
  963.      permission by entering a minus sign (-) followed by the user
  964.      name, an at-sign (@), followed by the host name on a line.
  965.      Do not put any spaces between the minus sign and the user
  966.      name or before or after the
  967.      at-sign.  That user on the specified host will be denied
  968.      permission, but only when coming from that host.
  969.  
  970.      You may also use the IP address of the host instead (the
  971.      dotted-decimal representation).  If you specify the name of
  972.      the host, that name must appear in the hosts on the Windows
  973.      NT system.
  974.  
  975.  
  976. If the request is coming from a Unix system, the user name is the
  977. login name of the user.  If the request is coming from another
  978. Windows PC, the method of specifying the user name is determined
  979. by the implementation of the rsh or rcp command you are using.
  980.  
  981. Note that the standard Unix rsh command (and the Winsock RSH
  982. command available from Denicomp Systems) allows a "-l" option to
  983. specify an alternate user name.  The "-l" option has meaning on a
  984. Unix system, but is not especially useful with Winsock RSHD/NT.
  985. However, if you do use the "-l" option to specify an alternate
  986. user, as with Unix, that user must be granted permission through
  987. the Security File in addition to the login name (Unix) or the name
  988. specified in your particular TCP/IP implementation (Windows/DOS).
  989.  
  990.  
  991. USING THE SECURITY FILE
  992.  
  993. To effectively use the Security File, you must first understand
  994. how it is viewed by Winsock RSHD/NT.
  995.  
  996. When Winsock RSHD/NT receives a request, it sequentially processes
  997. the lines in the Security File to determine whether or not the
  998. host and user are granted or denied access.  It looks at each line
  999. in the Security File until it determines that either the host or
  1000. the user is specifically denied permission.
  1001.  
  1002. Winsock RSHD/NT begins by assuming that permission is denied for
  1003. the request.  It then examines the lines in the Security File to
  1004. see if any of the lines pertain to this request.
  1005.  
  1006. Once Winsock RSHD/NT finds a line that denies access to either the
  1007. user or the host, it stops looking and denies permission.
  1008.  
  1009. If it finds a line that grants permission to the user and/or host,
  1010. permission is tentatively granted, but it continues to process the
  1011. lines in the Security File.
  1012.  
  1013.  
  1014. If it processes the entire Security File and does not find a line
  1015. that grants permission to the user and/or the host, permission is
  1016. denied.   If security was tentatively granted at some point and
  1017. not denied subsequently, permission is granted.
  1018.  
  1019. For example, let's say that the following is the contents of the
  1020. Security File:
  1021.  
  1022.       jetty
  1023.       booey
  1024.       eib
  1025.       192.56.42.3
  1026.       rs6000
  1027.       +fred@mars
  1028.       -gary@booey
  1029.       -jackie
  1030.       +robin
  1031.  
  1032. In this example, if any user on the host "jetty" makes a request,
  1033. permission will be granted, unless the user is "jackie", since
  1034. "jackie" is denied access from all hosts (-jackie).
  1035.  
  1036. If "jackie@jetty" makes a request, Winsock RSHD/NT reads through
  1037. the Security File and finds the host name "jetty", and tentatively
  1038. grants permission.  However, it continues and finds that the user
  1039. "jackie" is denied from all hosts, so permission is denied.
  1040.  
  1041. Also, if any user on the host "booey" makes a request, they are
  1042. granted permission unless the user is "gary", since "gary@booey"
  1043. is specifically denied permission (-gary@booey).  All other users
  1044. on the host "booey" are granted permission except "jackie" (-
  1045. jackie).
  1046.  
  1047. The user "fred" on the host "mars" is granted permission because
  1048. of the line "+fred@mars".  However, since the host "mars" does not
  1049. appear on a line by itself, no other users on the host "mars" are
  1050. granted permission except the user "robin", who is granted
  1051. permission from any host (+robin).
  1052.  
  1053.  
  1054. RSHD/NT AND NTFS SECURITY
  1055.  
  1056. Under Unix, the Remote Shell Daemon process (rshd) implements
  1057. security through user equivalence.  That is, it is assumed that
  1058. when an rcp or rsh command is executed by the user "john" on a
  1059. client system, the user "john" exists on the host  system and has
  1060. the appropriate privileges.
  1061.  
  1062. Under Unix, the Remote Shell Daemon process (rshd) runs as the
  1063. super-user, root.  Unix has a feature known as "set user id" or
  1064. "setuid".  When you execute an rsh or rcp, the Unix rshd
  1065. effectively "becomes" the user passed to it by rcp or rsh.  Any
  1066. process spawned (rsh) or file accessed/created (rcp) are done so
  1067. as if that user were logged on to the system, taking on the
  1068. security attributes of that user.
  1069.  
  1070. Windows NT has a similar capability (called "impersonation" in NT
  1071. lingo).  However, there is a basic, but important difference.  In
  1072. order for a process like RSHD/NT to "become" another user, that
  1073. user's password must be supplied.  This is incompatible with rcp
  1074. and rsh - they cannot ask for a password.  So it is not possible
  1075. for RSHD/NT to mirror this feature of Unix's rshd.
  1076.  
  1077. When RSHD/NT is installed by its SETUP program, an NT service is
  1078. created and is set up to run RSHD/NT as the user System, which is
  1079. a privileged account.  Any files accessed by RSHD/NT will be
  1080. accessed as the user System and any programs spawned will be done
  1081. so as the user System.
  1082.  
  1083. If you need to restrict access through RSHD/NT, you can change the
  1084. setup of the RSHD/NT service using the Services applet in the
  1085. Control Panel.  You can specify an account other than System and
  1086. RSHD/NT will execute with the security attributes of that user.
  1087. All rcp and rsh commands serviced will be restricted to the
  1088. privileges of that user.
  1089.  
  1090. You can specify the account name of an existing user.  However,
  1091. this can cause problems because you must also specify that user's
  1092. password in the Service setup.  If that user's password expires or
  1093. changes, you must remember to manually change it in the Service
  1094. setup at that time or RSHD/NT will not start.  NT will not update
  1095. the Service setup automatically.
  1096.  
  1097. An alternative is to set up a new account specifically for the
  1098. purpose of running RSHD/NT.  Specify that the account's password
  1099. does not expire so it will not be forced to change.  You can then
  1100. set up the security attributes of that user and they will be
  1101. inherited by all rsh and rcp commands serviced by RSHD/NT.  (This
  1102. is similar to the way NT's FTP Server implements security for
  1103. anonymous users.)
  1104.  
  1105. This will then allow you to restrict the files accessible by users
  1106. using rcp and rsh.  It is not totally ideal because all users will
  1107. be given the same access rights.  But it is a necessary compromise
  1108. because of the basic differences between NT and Unix.
  1109.  
  1110.  
  1111. EXECUTING COMMANDS
  1112.  
  1113. With Unix, the rsh utility executes the specified command on a
  1114. remote host and returns the standard output and the standard error
  1115. output to the requesting host.
  1116.  
  1117. With Windows, there is no such thing as "standard output" and
  1118. "standard error".  Programs execute in graphical windows, so there
  1119. is no way to return any output using rsh.
  1120.  
  1121. Therefore, when using rsh from Unix or another PC to initiate
  1122. commands on a Windows PC, you will not see any output of the
  1123. command on your screen.  It will display on the PC that received
  1124. the request.
  1125.  
  1126. For example, if you used the following command:
  1127.  
  1128.           rsh winpc3 excel
  1129.  
  1130. This would start Excel on the PC named "winpc3".  You would see
  1131. nothing on your screen as a result of starting Excel.  Excel would
  1132. be running on the screen of the PC named "winpc3".
  1133.  
  1134. The rsh command will NOT wait for the specified command to
  1135. complete.  The system issuing the request will regain control
  1136. immediately after the command begins.
  1137.  
  1138. If you attempt to execute a command that does not exist or Windows
  1139. returns an error trying to load the program, you will receive a
  1140. descriptive error message on your screen from Winsock RSHD/NT to
  1141. tell you that the command was not successfully executed.
  1142.  
  1143. Important Note:  Winsock RSHD/NT uses the PATH and other
  1144. environment variables specified in the Control Panel for the
  1145. entire system, not for a specific user.  If you are trying to
  1146. execute a command that Winsock RSHD/NT cannot find, check the
  1147. System environment variables.
  1148.  
  1149.  
  1150. SENDING KEYSTROKES
  1151.  
  1152. Winsock RSHD/NT provides the ability for you to send keystrokes to
  1153. the Windows application you initiate using the rsh command.  It
  1154. also allows you to specify how the window is to be displayed
  1155. (i.e., normal, minimized, maximized, or hidden).  This provides
  1156. you with some "remote control" over what the program you run does
  1157. once it starts.
  1158.  
  1159. For those of you who program in Microsoft Visual Basic or the
  1160. Visual Basic for Applications macro language, this is very similar
  1161. to the SendKeys capability of those programming languages.
  1162.  
  1163. The standard syntax of the rsh command is:
  1164.  
  1165.              rsh hostname command
  1166.  
  1167. This will execute "command" on the host "hostname".  Winsock
  1168. RSHD/NT allows a slight modification of the rsh syntax to send
  1169. keystrokes.  This is compatible with all rsh commands.  The
  1170. alternative syntax for sending keystrokes is:
  1171.  
  1172.              rsh hostname "<keystrokes>" command
  1173.  
  1174. If the first parameter after the host name begins with a less-than
  1175. sign (<), that parameter is interpreted as keystrokes to be sent
  1176. to the command specified in the next parameter.  The keystrokes
  1177. must end with a greater-than sign (>).  You must also enclose the
  1178. entire parameter in quotes so special characters and spaces are
  1179. not interpreted by the operating system.
  1180.  
  1181. For example, if you wanted to run the Windows Notepad on the PC
  1182. named "winpc3" and type "This is a test" on the first line, the
  1183. command would be:
  1184.  
  1185.              rsh winpc3 "<This is a test>" notepad
  1186.  
  1187. If you looked at the winpc3's screen, you would see the Windows
  1188. Notepad with "This is a test" on the first line.
  1189.  
  1190. You cannot send keystrokes to an application that is not designed
  1191. to run in Microsoft Windows (i.e., MS-DOS programs).
  1192.  
  1193. Important Note:  Due to a limitation in Windows NT, you cannot
  1194. send keystrokes to an application started through Winsock RSHD/NT
  1195. if there is no one logged in to Windows NT.  The program will be
  1196. executed, but it will not receive the keystrokes.
  1197.  
  1198.  
  1199. SENDING SPECIAL KEYSTROKES
  1200.  
  1201. Winsock RSHD/NT also allows you to specify special keys in the
  1202. keystrokes parameter that cannot normally be typed on a command
  1203. line, such as embedded Enter keys, function keys, ALT keys, etc.
  1204.  
  1205. Keystrokes are sent sequentially as the appear between the "<" and
  1206. ">".  To send a single character, use the character itself.  For
  1207. example, to send the letter "X", use the letter "X".  To send the
  1208. word "hello", just specify those letters.
  1209.  
  1210. To specify keys combined with any combination of Shift, Ctrl, and
  1211. Alt keys, prefix the regular key code to one or more of the
  1212. following codes:
  1213.  
  1214.           Shift     +
  1215.           Control   ^
  1216.           Alt       %
  1217.  
  1218. For example, to send the Alt-F keystroke, specify "%F".  To send
  1219. Ctrl-Alt-D, specify "^%D".
  1220.  
  1221. To send the Enter key, use the tilde (~).
  1222.  
  1223. To specify that the Shift, Ctrl, and/or Alt keys should be held
  1224. down while several other keys are pressed, enclose the key codes
  1225. in parentheses ( ).  For example, to have the Alt key held down
  1226. while X and D are pressed, use "%(XD)".  You could also use
  1227. "%X%D", but if the Shift, Ctrl, and/or Alt keys need to be held
  1228. down for a number of keystrokes, the parentheses can make the
  1229. string shorter.  Also, you would want to use the parentheses if
  1230. the application
  1231. detects the release of the Shift, Ctrl, and/or Alt keys and that
  1232. is not desired.
  1233.  
  1234. The following characters have special meaning in the keystroke
  1235. parameter, so they must be enclosed inside braces ({ }).  Some of
  1236. these special characters have not been explained yet.
  1237.  
  1238.             Special Character          Example
  1239.  
  1240.           +  (plus)                      {+}
  1241.           ^  (caret)                     {^}
  1242.           %  (percent)                   {%}
  1243.           ~  (tilde)                     {~}
  1244.           <  (less than)                 {<}
  1245.           >  (greater than)              {>}
  1246.           [  (left sq. bracket)          {[}
  1247.           ]  (right sq. bracket)         {]}
  1248.           (  (left paren)                {(}
  1249.           )  (right paren)               {)}
  1250.           @  (at-sign)                   {@}
  1251.           {  (left brace)                {{}
  1252.           }  (right brace)               {}}
  1253.  
  1254.  
  1255.  
  1256. To send characters that are not normally displayed when you press
  1257. a key (such as Enter or Tab) and keys that represent actions
  1258. rather than characters, use the following special codes:
  1259.  
  1260.        Key           Code                      Key            Code
  1261.  
  1262.      Backspace    {BACKSPACE} or {BS}         Break          {BREAK}
  1263.      Caps Lock    {CAPSLOCK}                  Clear          {CLEAR}
  1264.      Del          {DELETE} or {DEL}           Down Arrow     {DOWN}
  1265.      End          {END}                       Enter          {ENTER} or ~
  1266.      Esc          {ESCAPE} or {ESC}           Help           {HELP}
  1267.      Home         {HOME}                      Ins            {INSERT}
  1268.      Left Arrow   {LEFT}                      Num Lock       {NUMLOCK}
  1269.      Page Down    {PGDN}                      Page Up        {PGUP}
  1270.      Print Screen {PRTSC}                     Right Arrow    {RIGHT}
  1271.      Scroll Lock  {SCROLLLOCK}                Tab            {TAB}
  1272.      Up Arrow     {UP}                        F1             {F1}
  1273.      F2           {F2}                        F3             {F3}
  1274.      F4           {F4}                        F5             {F5}
  1275.      F6           {F6}                        F7             {F7}
  1276.      F8           {F8}                        F9             {F9}
  1277.      F10          {F10}                       F11            {F11}
  1278.      F12          {F12}                       F13            {F13}
  1279.      F14          {F14}                       F15            {F15}
  1280.      F16          {F16}
  1281.  
  1282. You can also specify that a key is to repeat itself a certain
  1283. number of times, without repeating the key itself in the string.
  1284. To repeat a keystroke, use the format:
  1285.  
  1286.                     {keystroke number}
  1287.  
  1288. Where "keystroke" is the key to repeat, followed by a single
  1289. space, then the number of times to repeat the key.
  1290.  
  1291. For example, to press the down arrow key eight times, use "{DOWN
  1292. 8}".
  1293.  
  1294. To type thirty *'s, use "{* 30}".
  1295.  
  1296.  
  1297.  
  1298. PAUSING WITHIN KEYSTROKES
  1299.  
  1300. Under some circumstances, it may be necessary to pause for a
  1301. specific time before sending keystrokes to allow a program
  1302. operation to complete.  This is usually necessary when a program
  1303. ignores keystrokes that have been queued while a lengthly
  1304. operation takes place.
  1305.  
  1306. Within the keystroke list, you can specify pauses by using the
  1307. special {PAUSE #} keystroke.
  1308.  
  1309. This is not actually a keystroke, in that it does not press any
  1310. key, but it can be included anywhere within the keystroke list.
  1311. It will pause the specified number of seconds.
  1312.  
  1313. For example, the following keystroke list will press Alt-F, P,
  1314. wait 10 seconds, then press Alt-F, X:
  1315.  
  1316.      <%FP{PAUSE 10}%FX>
  1317.  
  1318. You can specify multiple pauses in the keystroke list if
  1319. necessary.
  1320.  
  1321. Note:  A pause of one second is automatically added at the
  1322. beginning of the list of keystrokes when the Attempt Redirection
  1323. on Every Command option is enabled in the Control Panel.  When
  1324. this option is enabled, all commands are executed through the NT
  1325. command interpreter.  Adding the one second pause gives the
  1326. command interpreter time to start so that it does not receive the
  1327. keystrokes instead of the program you want to execute.  If your NT
  1328. system is extremely slow, you may need to add an additional pause
  1329. to the beginning of the keystroke list if you find that the one
  1330. second pause is not enough.
  1331.  
  1332. KEYSTROKE EXAMPLE
  1333.  
  1334. The following example, will start Microsoft Word, load a file,
  1335. print it, then exit.
  1336.  
  1337.     rsh winpc3 "<%FO\docs\invoice.doc~%FP~%FX>" word
  1338.  
  1339.  
  1340. The keystrokes are:
  1341.  
  1342.                  %F    - Alt-F  (Drops down the file menu)
  1343.                   O    - O      (Selects Open)
  1344.   \docs\invoice.doc    - Types the filename.
  1345.                  ~     - Enter  (Loads the File)
  1346.                  %F    - Alt-F  (Drops down the file menu)
  1347.                   P    - P      (Selects Print)
  1348.                   ~    - Enter  (Accepts the defaults on the Print dialog box)
  1349.                  %F    - Alt-F  (Drops down the file menu)
  1350.                   X    - X      (Selects eXit and Word exits)
  1351.  
  1352. Note that if this example were being run from a Unix system, you
  1353. would have to use two backslashes (\\) for every one desired
  1354. backslash because the Unix shells interpret the backslashes as
  1355. special characters.  The command would then be:
  1356.  
  1357.            rsh winpc3 "<%FO\\docs\\invoice.doc~%FP~%FX>" word
  1358.  
  1359.  
  1360. KEYSTROKE MACRO FILES
  1361.  
  1362. If your keystroke strings get rather long or complex, you can
  1363. store them in a keystroke macro file so you do not have to specify
  1364. all of them each time you use the rsh command.
  1365.  
  1366. To create a keystroke macro file, you must use a text editor (or a
  1367. word processor, but be sure to save as an ASCII file).  Enter the
  1368. keystrokes as you would on the rsh command line, with the
  1369. following exceptions/reminders:
  1370.  
  1371.    - Do not enter "<" as the first character in the file or ">"
  1372.      as the last character.  All of the characters you enter in
  1373.      the file will be sent.
  1374.  
  1375.    - You may press Enter in the file to enter the keystrokes on
  1376.      multiple lines.  The line breaks have no effect on the
  1377.      keystrokes.  They will be treated as if they were entered all
  1378.      on the same line.  That is, you must remember to still use
  1379.      "~" or "{ENTER}" to "press" the Enter key.  Pressing Enter in
  1380.      the file will not send the Enter key.
  1381.  
  1382.    - You cannot nest keystroke macros.  Your macro file cannot
  1383.      contain references to other keystroke macro files.
  1384.  
  1385.    - The keystroke macro file must reside on the PC running
  1386.      Winsock RSHD/NT. You can create the file on that PC or use
  1387.      rcp to copy it to that PC before executing the command.
  1388.  
  1389. To use a keystroke macro file, enter the at-sign (@) followed by
  1390. the filename in braces ({ }) where you would normally specify
  1391. keystrokes on the rsh command line.
  1392.  
  1393. You will most likely need to specify a full pathname of the
  1394. keystroke file on the PC running Winsock RSHD/NT, unless you know
  1395. the working directory of Winsock RSHD/NT on the system running it
  1396. and the keystroke macro resides in that directory.  You may use
  1397. forward slashes (/) instead of backslashes if you wish; this makes
  1398. life easier for Unix users because the shell interprets the
  1399. backslash characters.
  1400.  
  1401. For example, if you had a macro in the directory
  1402. \kbmac\printss.mac on the PC running Winsock RSHD/NT, you could
  1403. use it with this command:
  1404.  
  1405.       rsh winpc2 "<@{/kbmac/printss.mac}>" excel
  1406.  
  1407. This would run "excel" on winpc2 and send the keystrokes stored in
  1408. the file \kbmac\printss.mac to it.
  1409.  
  1410. You can intermix command line keystrokes and macro file
  1411. keystrokes.  That is, you can specify some of the keystrokes on
  1412. the command line and use some from a macro file.   You can also
  1413. use multiple macro files.
  1414.  
  1415. For example, let's say we want to print a file using rsh through a
  1416. Windows application called "wintiff".  We want to store the
  1417. keystrokes in a macro file, but do not want to store the filename
  1418. in the macro file because it can change.
  1419.  
  1420. To do this you can store the first set of keystrokes in one macro
  1421. file, specify the filename on the rsh command line, then store the
  1422. remaining keystrokes in a second file.
  1423.  
  1424. For example, let's say the file is "mypic.tif":
  1425.  
  1426. rcp mypic.tif winpc2:/tmp
  1427. rsh winpc2 "<@{/kb/tif1.mac}\tmp\mypic.tif~@{/kb/tif2.mac}"
  1428. wintiff
  1429.  
  1430. This example copies the file "mypic.tif" to the \tmp directory on
  1431. winpc2.  Then it runs "wintiff" and first sends the keystrokes
  1432. from the file \kb\tif1.mac.  That macro ends when "wintiff"
  1433. requires a filename.  The keystrokes to "type" the filename come
  1434. from the rsh
  1435. command line since the tif1.mac has ended.  Then it continues by
  1436. sending the keystrokes in the file \kb\tif2.mac.  That is:
  1437.  
  1438.     @{/kb/tif1.mac}      -  Send keystrokes from \kb\tif1.mac
  1439.        \tmp\mypic.tif~   -  Type \tmp\mypic.tif and press Enter
  1440.     @{/kb/tif2.mac}      -  Send keystrokes from \kb\tif2.mac
  1441.  
  1442.  
  1443. SPECIFYING THE WINDOW TYPE
  1444.  
  1445. Winsock RSHD/NT also allows you to specify the window type of the
  1446. application being run.  Normally, the application is run based on
  1447. the default window type specified in the Control Panel.
  1448.  
  1449. If you want to specify a different method of displaying the
  1450. application's window, you can specify this inside the keystroke
  1451. parameter by enclosing the method in square brackets ([ ]).
  1452.  
  1453.  
  1454.  
  1455. There are two methods of setting the window type.  You can use one
  1456. of the words shown below or you can use a number.  The options
  1457. are:
  1458.  
  1459.      Window Option                  Displays
  1460.  
  1461.       NORMAL   or NORM   Normal Display as defined by the application
  1462.       MINIMIZE or MIN    Shows the application as a minimized icon without focus
  1463.       MINACTIVE or MINA  Shows the application as a minimized icon with focus
  1464.       MAXIMIZE or MAX    Maximizes the application on startup
  1465.       HIDE               Hides the application (no icon appears)
  1466.       0                  Same as HIDE
  1467.       1                  Same as NORMAL
  1468.       7                  Same as MINIMIZE
  1469.       2                  Same as MINACTIVE
  1470.       3                  Same as MAXIMIZE
  1471.  
  1472. Other numeric values may be used - they correspond to the Windows'
  1473. ShowWindow function (for all you programmers).
  1474.  
  1475. For example, if you want to run the Windows Notepad maximized,
  1476. viewing the file "heyyou.txt", you would type:
  1477.  
  1478.     rsh winpc3 "<[MAXIMIZE]>%FOheyyou.txt~" notepad
  1479.  
  1480. This runs the Notepad maximized, then "presses" Alt-F-O (File
  1481. Open) and types the filename "heyyou.txt" and presses Enter to
  1482. load it.
  1483.  
  1484. If you wanted to run some application that does some task and
  1485. exits, you could run it minimized using:
  1486.  
  1487.     rsh winpc3 "<[MINIMIZE]>" bkgprint
  1488.  
  1489. Note that Windows does not allow you to send keystrokes to a
  1490. minimized or hidden application.  Therefore, "[MINIMIZE]",
  1491. "[HIDE]", "[0]", or "[2]" should always appear alone between the
  1492. "<" and ">".  If you specify other keystrokes, the application
  1493. will not receive them (Windows will beep at you for each
  1494. keystroke).
  1495.  
  1496.  
  1497. WAITING FOR COMMANDS TO COMPLETE
  1498.  
  1499. By default, Winsock RSHD/NT returns control back to the system
  1500. issuing the command via rsh immediately after the command is
  1501. started and any keystrokes are sent.  It does not wait for the
  1502. command to complete.
  1503.  
  1504.  
  1505. If you want the rsh command to wait until the command finishes
  1506. executing, you can use the "[WAIT]" option.  This is specified
  1507. like the Window Type, as explained in the previous section.
  1508.  
  1509. For example, to execute the command "bkgprint" and wait for it to
  1510. finish, use:
  1511.  
  1512.      rsh winpc3 "<[WAIT]>" bkgprint
  1513.  
  1514. As with the Window Type, you can combine options and keystrokes.
  1515. This runs the above command, but minimizes it and waits:
  1516.  
  1517.      rsh winpc3 "<[MINIMIZE][WAIT]>" bkgprint
  1518.  
  1519. Note that Winsock RSHD/NT cannot process other command requests
  1520. when you instruct it to wait for a command to complete.  If other
  1521. users issue commands to the PC while it is waiting, they will be
  1522. queued until Winsock RSHD/NT can process them.  The number of
  1523. requests that can be queued depends on the Listen Backlog
  1524. parameter explained in the Winsock RSHD/NT Configuration section.
  1525.  
  1526.  
  1527. EXECUTING MS-DOS "INTERNAL" COMMANDS
  1528.  
  1529. Some commands that you can execute at Windows NT's Command Prompt
  1530. are not actually programs; they are internally recognized by the
  1531. command interpreter CMD.EXE.  One example of this is the DIR
  1532. command.  If you look in the directory where Windows NT is
  1533. installed, there will be no DIR.EXE.  It is part of CMD.EXE.
  1534.  
  1535. In previous versions of Winsock RSHD/NT, you had to prefix these
  1536. internal commands with "cmd /c".  Winsock RSHD/NT now recognizes
  1537. internal commands and will execute them through the NT command
  1538. interpreter.  Prefixing the commands with "cmd /c" is no longer
  1539. necessary, although it will still work if you do.
  1540.  
  1541.  
  1542. CAPTURING STANDARD OUTPUT AND STANDARD ERROR
  1543.  
  1544. You can optionally capture the standard output and standard error
  1545. output of Windows NT Console or MS-DOS commands through Winsock
  1546. RSHD/NT with the rsh command.  This allows you to display the
  1547. output of these programs that output to the standard output or
  1548. standard error on another screen or capture it to a file on
  1549. another system.
  1550.  
  1551. To do this, you must tell Winsock RSHD/NT that you are executing a
  1552. Console or MS-DOS command.  Winsock RSHD/NT cannot tell whether
  1553. the command you issue is a Windows program or a Console/MS-DOS
  1554. program until it starts executing it (and by then, it's too
  1555. late!).
  1556.  
  1557.  
  1558. To capture the standard output/standard error of a command, use
  1559. the "[CON]" option in the rsh command.  For example:
  1560.  
  1561.     rsh winpc3 "<[CON]>" net view
  1562.  
  1563. This will run the "net view" command on "winpc3" and display the
  1564. output on the your screen.  The "net view" command displays
  1565. information on the standard output.  Note that if your command
  1566. requires any command line switches, place a space between the
  1567. command name and the switch.  For example, use "mem /c", not
  1568. "mem/c".
  1569.  
  1570. Note:  There is a configuration option that tells Winsock RSHD/NT
  1571. to assume the "<[CON]>" option on every command and capture the
  1572. standard output and standard error.  If this option is enabled,
  1573. you do not need to specify the "<[CON]>" option.
  1574.  
  1575. If you are on a Unix system and you want to store the output of
  1576. the "net view" command in a file, you can use the following
  1577. command:
  1578.  
  1579.     rsh winpc3 "<[CON]>" net view > net.out
  1580.  
  1581. In this example, the file "net.out" will be created on the Unix
  1582. system, the system where the rsh command originated.  The ">
  1583. net.out" part of the command is not passed to "winpc3" because the
  1584. Unix shell interprets it first.
  1585.  
  1586. If you are using a Windows system and you want to do the same
  1587. thing, you must refer to the instructions for the implementation
  1588. of the rsh command you are using.  Windows does not support
  1589. redirection, but MS-DOS does.  If your rsh command is MS-DOS
  1590. based, the above
  1591. command may work from a DOS prompt.  If you are using Denicomp
  1592. Systems's Winsock RSH, you could do the above within Windows with
  1593. the following command:
  1594.  
  1595.     rsh winpc -r net.out "<[CON]>" net view
  1596.  
  1597. Note that some MS-DOS programs do not write to the standard
  1598. output; instead they directly write to video memory.  Output from
  1599. these programs cannot be captured.
  1600.  
  1601. If you have enabled the option to Buffer Standard Output/Standard Error
  1602. until the end of the command, the standard output will be sent first,
  1603. then the standard error output.  You can reverse this order by using
  1604. "<[CON2]>" in place of "<[CON]>".
  1605.  
  1606. To maintain compatibility with the Windows 3.1 version of Winsock
  1607. RSHD/NT, you may also use "[DOS]" or "[DOS2]" in place of "[CON]"
  1608. and "[CON2]".
  1609.  
  1610.  
  1611. DISABLING THE CAPTURE OF STANDARD OUTPUT AND STANDARD ERROR
  1612.  
  1613. There is a configuration option that tells Winsock RSHD/NT to
  1614. assume the "<[CON]>" option on every rsh command and attempt to
  1615. capture the standard output and standard error.  This is useful if
  1616. you mostly execute Windows NT Console and MS-DOS programs.
  1617.  
  1618. Howver, this can cause problems when you need to execute a Windows
  1619. program.  If this option is enabled, you cannot send keystrokes to
  1620. the program and Winsock RSHD/NT will automatically wait for the
  1621. command to complete.  There is also some additional overhead
  1622. involved in running the program.
  1623.  
  1624. If you have enable this option to assume the "<[CON]>" option and
  1625. you need to run a Windows program and send keystrokes to it or you
  1626. do not want rsh to wait for it to complete, specif the "<[WIN]>"
  1627. option in the rsh command line.  This option overrides the assumed
  1628. "<[CON]>" option for the command.  For example:
  1629.  
  1630.           rsh winpc "<[WIN]%FP~%FX>" excel abc.xls
  1631.  
  1632. This will run the command "excel abc.xls" on winpc as a Windows
  1633. program and send the specified keystrokes to it, overriding the
  1634. assumed "<[CON]>" option.
  1635.  
  1636.  
  1637. COPYING FILES USING RCP
  1638.  
  1639. Winsock RSHD/NT also provides Remote Copy (RCP) Server capability.
  1640. This allows you to copy files to and from a PC running Winsock
  1641. RSHD/NT using the rcp command.
  1642.  
  1643. The rcp command is commonly found on Unix systems, Windows NT
  1644. systems, and in some TCP/IP packages for Windows and DOS.  If your
  1645. TCP/IP package does not provide the rcp command, you can use
  1646. Winsock RCP from Denicomp Systems.
  1647.  
  1648. The rcp command is described in more detail in your TCP/IP package
  1649. manual or with the manual that comes with Winsock RCP.  However,
  1650. here are a few examples of its use.
  1651.  
  1652. Important Note:  Unlike the standard Unix rcp command and Denicomp
  1653. Systems' rcp command (found in the Winsock RCP/RSH package), the
  1654. Windows NT rcp command copies all files with ASCII conversion by
  1655. default.  Binary files must be copied using the -b option of NT's
  1656. rcp command.  If you do not use the -b option on binary files, the
  1657. contents of the file will be altered on the destination system.
  1658.  
  1659. To copy a file from the host named "srvpc" to your PC or Unix
  1660. system, use:
  1661.  
  1662.       rcp srvpc:yourfile myfile
  1663.  
  1664. The file "yourfile" is copied from the host named "srvpc" to the
  1665. file on your PC named "myfile".  The host "srvpc" could be running
  1666. either Windows and Winsock RSHD/NT or Unix.
  1667.  
  1668. To copy a file from your PC or Unix system to the PC named
  1669. "srvpc", use:
  1670.  
  1671.       rcp \lists\xmas.doc srvpc:\word\lists
  1672.  
  1673. The file \lists\xmas.doc is copied from your system to the file
  1674. xmas.doc in the directory \word\lists on the PC named "srvpc".
  1675.  
  1676. To send the entire directory tree from your PC or Unix system to
  1677. "srvpc", use:
  1678.  
  1679.       rcp -b -r \share srvpc:\
  1680.  
  1681. All of the files and subdirectories in the directory \share are
  1682. copied to the PC named "srvpc".  It will create a \share directory
  1683. in the root directory (\) of srvpc.
  1684.  
  1685. If the \share directory contained any subdirectories, they would
  1686. be created on the other PC and all the files in them would also be
  1687. copied.
  1688.  
  1689. To copy all of the files ending with ".xls" from "srvpc" to your
  1690. PC, use:
  1691.  
  1692.       rcp -b srvpc:\sheets\*.xls .
  1693.  
  1694. This copies all of the files ending with ".xls" in the directory
  1695. \sheets on "srvpc" to the current directory (.) on your PC.
  1696.  
  1697. You can use drive letters if necessary.  For example, to copy a
  1698. file from the A: drive on the "srvpc" to your PC:
  1699.  
  1700.       rcp srvpc:a:file.txt file.txt
  1701.  
  1702. This will copy "file.txt" from the A: drive on "srvpc" to the file
  1703. "file.txt" on your system.
  1704.  
  1705. NOTE: Winsock RSHD/NT allows you to use both slashes (/) and
  1706. backslashes (\) for directory separators.  It will adjust
  1707. appropriately.  This is especially important for Unix users, since
  1708. backslashes are interpreted by the shell and must be escaped by
  1709. using two backslashes for every one backslash.  Use slashes
  1710. instead.
  1711.  
  1712.  
  1713. SHUTTING DOWN AND REBOOTING WINDOWS NT USING RSH
  1714.  
  1715. Winsock RSHD/NT suppors two "internal" commands that allow you to remotely
  1716. shutdown or reboot the NT system.  These commands do not actually exist
  1717. as programs - they are understood internally by RSHD/NT.  To use them,
  1718. you need to use the special "<[INTERNAL]>" specifier.  This can be
  1719. abbreviated to "<[INT]>".
  1720.  
  1721. The two internal commands are shutdown and reboot.  The syntax is:
  1722.  
  1723.        rsh ntsystem "<[INT]>" shutdown [#]
  1724. or
  1725.        rsh ntsystem "<[INT]>" reboot [#]
  1726.  
  1727. Where # is an optional number of seconds to wait before the system shuts
  1728. down or reboots.  If it is not specified, it is shutdown or rebooted
  1729. immediately.
  1730.  
  1731. For example:
  1732.  
  1733.        rsh ntsystem "<[INT]>" shutdown 30
  1734.  
  1735. Waits 30 seconds and then shuts down the system.  The command:
  1736.  
  1737.        rsh ntsystem "<[INT]>" reboot
  1738.  
  1739. Immediately begins the reboot procedure.
  1740.  
  1741.  
  1742. WINSOCK RSHD/NT UTILITIES
  1743.  
  1744. Winsock RSHD/NT includes two utilities that allow you to control
  1745. the operation of the Winsock RSHD/NT service.
  1746.  
  1747. The first utility is wrshdctl.  This can be run in two ways.
  1748. First, you can use the Service Control button in the Winsock
  1749. RSHD/NT Control Panel applet.  Or, it can be found in the
  1750. directory in which you installed Winsock RSHD/NT.  It is a Windows
  1751. NT program that allows you to install, start, stop, and remove the
  1752. Winsock RSHD/NT service.
  1753.  
  1754. To use it, get to a Windows NT Command Prompt (in the Main program
  1755. group).  Change to the directory where Winsock RSHD/NT is
  1756. installed using the CD command (for example, CD \WRSHDNT).  Then
  1757. type "wrshdctl".
  1758.  
  1759. You can run wrshdctl from the Windows NT Program Manager also, as
  1760. long as you are not going to use it to re-install Winsock RSHD/NT.
  1761. You must be in the Winsock RSHD/NT directory to re-install the
  1762. Winsock RSHD/NT Service if it has been removed.
  1763.  
  1764. You can then do the following:
  1765.  
  1766. Start the Winsock RSHD/NT Service
  1767.  
  1768.      This starts the Winsock RSHD/NT Service if it is not currently running.
  1769.      
  1770. Stop the Winsock RSHD/NT Service
  1771.  
  1772.      This stops the Winsock RSHD/NT Service if it is currently
  1773.      running.  This is useful when you have changed the Winsock
  1774.      RSHD/NT configuration.  Stopping and restarting Winsock
  1775.      RSHD/NT will cause it to re-read the configuration options.
  1776.      
  1777. Install the Winsock RSHD/NT Service
  1778.      
  1779.      This installs the Winsock RSHD/NT Service in Windows NT's
  1780.      list of services.  It does not install the files from the
  1781.      Winsock RSHD/NT diskette.  It only adds Winsock RSHD/NT to
  1782.      the list of services that Windows NT can execute.
  1783.      
  1784. Remove the Winsock RSHD/NT Service
  1785.      
  1786.      This removes the Winsock RSHD/NT Service from Windows NT's
  1787.      list of services.  It does not delete any files.  It only
  1788.      removes it from the list of services.  Use the Install option
  1789.      to add it to the list again.
  1790.  
  1791. There is another utility included with Winsock RSHD/NT that
  1792. performs the same operations as wrshdctl, but is a command line
  1793. oriented utility.  It is called ctrlrshd.
  1794.  
  1795. This command can be executed from the Windows NT Command Prompt
  1796. while you are in the Winsock RSHD/NT directory (\WRSHDNT), unless
  1797. you have included that directory in your path.  Its syntax is:
  1798.  
  1799.      ctrlrshd install [auto | manual [directory]]
  1800.  
  1801.      ctrlrshd start
  1802.  
  1803.      ctrlrshd stop
  1804.  
  1805.      ctrlrshd remove
  1806.  
  1807.  
  1808. The install option installs the Winsock RSHD/NT service in Windows
  1809. NT's list of services.  It does not start Winsock RSHD/NT.  You
  1810. can optionally specify whether you want Winsock RSHD/NT to start
  1811. automatically each time Windows NT is booted (auto) or if you want
  1812. to start Winsock RSHD/NT manually when necessary (manual).  If you
  1813. do not specify either, auto is assumed.  The directory option is
  1814. used when you are using the install option and Winsock RSHD/NT is
  1815. not installed in the current working directory.  If it is not,
  1816. specify the directory name as the third parameter.  Note that if
  1817. you specify a directory, then you must also specify auto or
  1818. manual.
  1819.  
  1820. The start option starts the Winsock RSHD/NT service.  Winsock
  1821. RSHD/NT will begin accepting requests.
  1822.  
  1823. The stop option stops the Winsock RSHD/NT service.  It will no
  1824. longer accept requests.  This does not remove it from Windows NT's
  1825. list of services; it only stops it until you decide to restart it
  1826. using the start option.
  1827.  
  1828. The remove option removes Winsock RSHD/NT from Windows NT's list
  1829. of services.  It will no longer accept requests and will no longer
  1830. be available to start or stop.  Note that  you must first use the
  1831. stop option if Winsock RSHD/NT is running before removing it.
  1832.  
  1833. The remove option does not delete any files; it only removes
  1834. Winsock RSHD/NT from the list of available services.  You can
  1835. later add it back to the list using the install option.
  1836.  
  1837.  
  1838. FREQUENTLY ASKED QUESTIONS
  1839.  
  1840. Why does it sometimes take a few seconds for RSHD/NT to execute a
  1841. command from an rsh or to copy a file from an rcp command?
  1842.  
  1843. This is due to something in the Windows NT TCP/IP implementation.
  1844. Often, your first rcp or rsh will be fast, then subsequent
  1845. commands will be delayed by a few seconds.  This delay is not
  1846. caused by RSHD/NT.  It takes NT a few seconds at times to notify
  1847. RSHD/NT that there is a connection waiting.  RSHD/NT processes the
  1848. request very quickly once it is notified.
  1849.  
  1850. To illustrate this, restart your NT system, then issue an rsh or
  1851. rcp command from another system to the NT system.  It will be
  1852. quick.  Then immediately issue another rcp or rsh; it will be
  1853. delayed by a few seconds.
  1854.  
  1855. The root of this problem can be explained somewhat, although
  1856. technical.  After issue the first rcp or rsh, the TCP/IP
  1857. connection (a "socket") is closed and it goes into the TIME_WAIT
  1858. state, which is normal.  You can see this by typing the netstat
  1859. command on the NT system after you do an rcp or rsh to it.
  1860.  
  1861. As long as there are closed sockets in the TIME_WAIT state which
  1862. were created by RSHD/NT, you will experience the delay.  It takes
  1863. up to four minutes (a TCP/IP constant) for them to go out of the
  1864. TIME_WAIT state.  Once they do, the next rcp or rsh will be quick.
  1865. Then the cycle repeats; you need to wait another four minutes for
  1866. it to be quick again.
  1867.  
  1868. We are not sure why this occurs.  There is no way for the
  1869. TIME_WAIT state to be avoided with rcp and rsh; in fact, the
  1870. TCP/IP standards require that connections go into the TIME_WAIT
  1871. state after they are closed.  The problem is not specific to
  1872. RSHD/NT, so we hope that at some time Microsoft will change this
  1873. behavior.
  1874.  
  1875.  
  1876. SUPPORT
  1877.  
  1878. Support is available via U.S. Mail and Compuserve/Internet.
  1879.  
  1880. Denicomp Systems
  1881. P.O. Box 731
  1882. Exton, PA  19341
  1883.  
  1884. Compuserve: 71612,2333
  1885. Internet:        71612.2333@compuserve.com
  1886.  
  1887.